package com.wht.service;

import com.wht.domain.Singer;
import com.wht.mapper.SingerMapper;
import com.wht.utils.MyBatisUtils;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.IOException;
import java.util.List;

/**
 * @author wanghaotian
 * time:2022/11/25,0025 10:40
 * description:
 */

public class FindAllSingerServiceImpl implements FindAllSingerService {
    @Override
    public List<Singer> findAllSinger() {
        SingerMapper mapper = MyBatisUtils.getMapper(SingerMapper.class);
        List<Singer> list = mapper.findAllSinger();
        return list;
    }

    @Override
    public Singer findOneSinger(Integer sid) {
        SingerMapper mapper = MyBatisUtils.getMapper(SingerMapper.class);
        Singer singer = mapper.findOneSinger(sid);
        return singer;
    }
}
